package com.frxuexi.park2301.fragment

import com.alibaba.android.arouter.launcher.ARouter
import com.blankj.utilcode.util.SPUtils
import com.frxuexi.lib_base.mvvm.BaseViewFragment
import com.frxuexi.lib_base.net.Const
import com.frxuexi.park2301.databinding.FragmentMyBinding

class MyFragment : BaseViewFragment<FragmentMyBinding>() {
    override fun initData() {

    }

    override fun initView() {
        binding.myfavIv.setOnClickListener {
            ARouter.getInstance().build("/app/MyApplyActivity").navigation()
        }

        binding.mymenIv.setOnClickListener {
            ARouter.getInstance().build("/app/MyApproveActivity").navigation()
        }

        binding.myEdit.setOnClickListener {
            ARouter.getInstance().build("/app/MyInfoActivity").navigation()
        }

        binding.mychange.setOnClickListener {
            SPUtils.getInstance().apply {
                remove(Const.TOKEN)
                remove(Const.UID)
                remove(Const.USERNAME)
                remove(Const.ROLE)
                remove("loginTime")
            }
            ARouter.getInstance().build("/app/LoginActivity").navigation()
        }
    }

}